package com.chenyue.cm.api.sms.service.impl;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chenyue.cm.api.sms.service.JdSmsRecordService;
import com.chenyue.cm.base.service.BaseServiceImpl;
import com.chenyue.cm.sms.dao.JdSmsRecordMapper;
import com.chenyue.cm.sms.domain.JdSmsRecord;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
*
* @author LBX
*/
@Service(value = "JdSmsRecordService")
public class JdSmsRecordServiceImpl extends BaseServiceImpl<JdSmsRecord>  implements JdSmsRecordService {

    private JdSmsRecordMapper jdSmsRecordMapper;

	public JdSmsRecordServiceImpl(@Qualifier("jdSmsRecordMapper") JdSmsRecordMapper jdSmsRecordMapper) {
		this.jdSmsRecordMapper = jdSmsRecordMapper;
	}

	@Override
	@Resource(name = "jdSmsRecordMapper")
	public void setBaseDao(BaseMapper<JdSmsRecord> baseMapper) {
		// TODO Auto-generated method stub
		this.baseDao = baseMapper;
	}

	@Override
	public boolean save(JdSmsRecord entity) {
		return jdSmsRecordMapper.insert(entity) > 0;
	}
}
